#! /usr/bin/env python3
#-*-coding:utf-8 -*-

import time
import subprocess

class BagRecorder:
    def __init__(self, pid, prefix: None, bag_name: None, topics):
        self.pid = pid
        self.bag_name = bag_name
        self.topics = topics
    
    def start_record(self):
        self.pid = start_record(self.topics, self.bag_name)
    

def start_record(topics: list, bag_name):
    pre_cmd = "rosbag record"
    for 
